Is it possible to have editable listView?
I just want to copy the contents in the rows. Not by scripting by selecting the value and ctrl+c.
Is there any special option available?
BrownK - Fri Aug 23 06:15:49 EDT 2013 |
Re: Is it possible to have editable listView? It is not possible to select text from a list view.
One possible solution is to add a callback that displays another dialog containing the selected text in an editable text box. Here is some example code:
DB db = null
DBE dbeListView = null
DB dbChild = null
string dummy[] = { }
void doSelect(DBE dbe, int i)
{
}
void doDeselect(DBE dbe, int i)
{
}
void doActivate(DBE dbe, int i)
{
dbChild = create("Value")
text(dbChild, "", get(dbeListView, i), 50, false)
realize(dbChild)
block(dbChild)
}
db = create("ListView")
dbeListView = listView(db, 0, 190, 15, dummy)
realize(db)
insertColumn(dbeListView, 0, "", 160, iconNone)
insert(dbeListView, 0, "Text in first row", iconNone)
insert(dbeListView, 1, "Text in second row", iconNone)
set(dbeListView, doSelect, doDeselect, doActivate)
show(db)
|
Re: Is it possible to have editable listView? Tony_Goodman - Fri Aug 23 06:52:57 EDT 2013 It is not possible to select text from a list view.
One possible solution is to add a callback that displays another dialog containing the selected text in an editable text box. Here is some example code:
DB db = null
DBE dbeListView = null
DB dbChild = null
string dummy[] = { }
void doSelect(DBE dbe, int i)
{
}
void doDeselect(DBE dbe, int i)
{
}
void doActivate(DBE dbe, int i)
{
dbChild = create("Value")
text(dbChild, "", get(dbeListView, i), 50, false)
realize(dbChild)
block(dbChild)
}
db = create("ListView")
dbeListView = listView(db, 0, 190, 15, dummy)
realize(db)
insertColumn(dbeListView, 0, "", 160, iconNone)
insert(dbeListView, 0, "Text in first row", iconNone)
insert(dbeListView, 1, "Text in second row", iconNone)
set(dbeListView, doSelect, doDeselect, doActivate)
show(db)
Added a couple "Louie" DBEs including a "CopyToClipboard" button. You could "hide(dbeLouie1)" and just leave the button. |
Re: Is it possible to have editable listView? Tony_Goodman - Fri Aug 23 06:52:57 EDT 2013 It is not possible to select text from a list view.
One possible solution is to add a callback that displays another dialog containing the selected text in an editable text box. Here is some example code:
DB db = null
DBE dbeListView = null
DB dbChild = null
string dummy[] = { }
void doSelect(DBE dbe, int i)
{
}
void doDeselect(DBE dbe, int i)
{
}
void doActivate(DBE dbe, int i)
{
dbChild = create("Value")
text(dbChild, "", get(dbeListView, i), 50, false)
realize(dbChild)
block(dbChild)
}
db = create("ListView")
dbeListView = listView(db, 0, 190, 15, dummy)
realize(db)
insertColumn(dbeListView, 0, "", 160, iconNone)
insert(dbeListView, 0, "Text in first row", iconNone)
insert(dbeListView, 1, "Text in second row", iconNone)
set(dbeListView, doSelect, doDeselect, doActivate)
show(db)
|
Re: Is it possible to have editable listView? llandale - Fri Aug 23 14:16:53 EDT 2013
Thank you guys :) I have one more problem when I close the dialog containing the selected text in an editable text box the screen focus is gone out of the main dialog and the dxl editor is on focus. Is there any way to sustain the focus on the main dialog ?
. |
Re: Is it possible to have editable listView? BrownK - Mon Aug 26 09:22:14 EDT 2013 Thank you guys :) I have one more problem when I close the dialog containing the selected text in an editable text box the screen focus is gone out of the main dialog and the dxl editor is on focus. Is there any way to sustain the focus on the main dialog ?
. If you have a DB handle on that dialog, you can
-Louie |